class: center, middle, inverse, title-slide # Starting a map in leaflet --- layout: true <div class="dk-footer"> <span> <a href="https://rfortherestofus.com/" target="_blank">R for the Rest of Us </a> </span> </div> --- class: center, middle, dk-section-title background-image:url("images/pexels-photo-7431661.jpeg") background-size: cover # Starting a map in leaflet --- > How much context does your map need? .pull-left[
] .pull-right[
] --- # {leaflet} map tiles `{leaflet}` has a much wider array of map tiles available than `{ggspatial}`. You can obtain the names of all the map tiles from `leaflet::providers` [This website](http://leaflet-extras.github.io/leaflet-providers/preview/index.html) allows you to compare the map tiles. --- # {leaflet} background color The `{leaflet.extras}` package add lots of additional functionality to `{leaflet}` - including setting a background color. ```r leaflet_map %>% setMapWidgetStyle(list(background= "lightblue")) ``` --- ## Using columns in {leaflet} In `{ggplot2}` we used `aes()` to create mappings between our data and the chart. In `{leaflet}` we use `~column_name` ---